﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Housing;

public partial class ManageCenter_ManageStreetName : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            add.Visible = false;
        }
    }
    protected void btnaddnew_Click(object sender, EventArgs e)
    {
        add.Visible = true;
    }
    protected void btnaddstreet_Click(object sender, EventArgs e)
    {
        StreetNumId streetnum = new StreetNumId();
        streetnum.Str_noid=txbnoid.Text;
        streetnum.Str_streetname=txbname.Text;
        streetnum.Str_letter=txbletter.Text;
        if (streetnum.AddNewStreetNum(streetnum))
            WebHelper.AlertAndRedirect("添加成功！", "ManageStreetName.aspx");
        else
            WebHelper.Alert("添加失败，请重新操作");
    }
}
